{% load theming_tags admintools_bootstrap %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}</title>
{#<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />#}
{% block extrastyle %}{% endblock %}
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
{#{% render_theming_css %}#}
<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>
{% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}

<script type="text/javascript">
$(function(){

  var django_dismimssPopup = window.dismissAddAnotherPopup;

  window.dismissAddAnotherPopup = function(win, newId, newRepr) {
    var name = windowname_to_id(win.name);
    var elem = document.getElementById(name);
    django_dismimssPopup(win, newId, newRepr);
    $(elem).removeClass('chzn-done');
    $('#' + name + '_chzn').remove();
    $(elem).chosen();
  }

});
</script>
</head>
{% load i18n %}

<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">

<!-- Container -->
<div id="container" class="container-fluid{% if is_popup %} container-popup{% endif %}">
    {% if not is_popup %}
    <!-- Header -->
    <div id="header" class="topbar" data-dropdown="dropdown">
      <div class="topbar-inner">
      <div class="container-fluid">
        {% block branding %}{% endblock %}
        {% block nav-global %}{% endblock %}
        {% block search %}{% endblock %}
        {% if user.is_active and user.is_staff %}
        <ul class="nav secondary-nav">
            {% atb_site_link %}
            <li class="dropdown">
              <a class="dropdown-toggle" href="#">
                <span class="ui-icon ui-icon-person ui-state-default"></span>
                {% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}
              </a>
              <ul class="dropdown-menu">
              {% block userlinks %}
                  {% url django-admindocs-docroot as docsroot %}
                  {% if docsroot %}
                      <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
                  {% endif %}
                  {% url admin:password_change as password_change_url %}
                  <li>
                    {% if password_change_url %}
                        <a href="{{ password_change_url }}">
                    {% else %}
                        <a href="{{ root_path }}password_change/">
                    {% endif %}
                    {% trans 'Change password' %}</a>
                  </li>
                  {% url admin:logout as logout_url %}
                  <li>
                    {% if logout_url %}
                        <a href="{{ logout_url }}">
                    {% else %}
                        <a href="{{ root_path }}logout/">
                    {% endif %}
                    {% trans 'Log out' %}</a>
                  </li>
              {% endblock %}
              </ul>
            </li>
        </ul>
        {% endif %}
      </div>
      </div>
    </div>
    <!-- END Header -->
      {% breadcrumbs %}
      {% block breadcrumbs %}
        /|{% trans "Home" %}
        {% if title %}{{ title }}{% endif %}
      {% endblock %}
      {% endbreadcrumbs %}
    {% endif %}

    <div class="main-container">
        {% block messages %}
          {% if messages %}
              {% for message in messages %}
                <div class="alert-message {{ message.tags }}" data-alert="alert"><a class="close" href="#">x</a>{{ message }}</div>
              {% endfor %}
          {% endif %}
        {% endblock %}

      <!-- Content -->
      <div id="content" class="{% block coltype %}container-fluid{% endblock %}">
          {% block pretitle %}{% endblock %}
          {% block content_title %}
            {% if title %}
            <div class="well page-top">
              <h1>{{ title }}</h1>
              {% block object-tools %}{% endblock %}
            </div>
            {% endif %}
          {% endblock %}
          {% block content %}
          {{ content }}
          {% endblock %}
          {% block sidebar %}{% endblock %}
          <br class="clear" />
      </div>
      <!-- END Content -->

      {% block footer %}<div id="footer"></div>{% endblock %}
    </div>
</div>
<!-- END Container -->

</body>
</html>
